{{#partial "title"}}
    <title>编辑博客</title>
{{/partial}}

{{#partial "content"}}
    <div class="ui grid">
        <div class="three wide column">
            <a class="avatar"
               href="/posts?author={{post.author.id}}"
               data-title="{{post.author.username}}"
               data-content="{{post.author.bio}}">
                <img class="ui circular image" src="{{post.author.avatar}}">
                <br/>
                <span>{{post.author.username}}</span>
            </a>
        </div>

        <div class="ten wide column">
            <form class="ui form segment" method="post" action="/posts/{{post.id}}/edit">
                <div class="field required">
                    <label>标题</label>
                    <input type="text" name="title" value="{{post.title}}">
                </div>
                <div class="field required">
                    <label>内容</label>
                    <textarea name="content" rows="15">{{post.content}}</textarea>
                </div>
                <input type="submit" class="ui button" value="发布">
            </form>
        </div>
    </div>
{{/partial}}

{{> layout/default}}
